#include<stdio.h>
#include<conio.h>
int c[5000][5000],m,n,u,v,i,j;
int visited[5000],agree[5000];
int stack[100000],last=0;
long count=0;
void input(){
    FILE *fp=fopen("ADS.INP","r");
    fscanf(fp,"%d%d",&n,&m); 
    for(i=1;i<=m;i++){
        fscanf(fp,"%d%d",&u,&v);
        c[u][v]=c[v][u]=1;
    }
    fclose(fp);
}
void dfs(int min,int u){
    for(int i=min+1 ;i<=n;i++){
        if(c[u][i]==1 && i!=u){
            if(c[u][min]==1 && agree[u]>1){
                printf(" %d OK",u);
                count++;
                return;
            }
            if(!visited[i]){
                printf("\n%d-->%d",u,i);
                agree[i]=agree[u]+1;
                visited[i]=1;
                dfs(min,i);
                visited[i]=0;
            }
        }
    }
}
void process(){
    for(int i=1;i<n;i++){
        printf("\nStart %d\n",i);
        dfs(i,i);
    }
}
int main(){
    input();
    process();
    printf("%d",count);
    getch();
    return 0;
}
